//
// Created by v on 24-12-7.
//

#ifndef JKLIBS_SNAKYMEDIARUN_H
#define JKLIBS_SNAKYMEDIARUN_H

#include "cm_video_ctrl.h"
#include "CMUIShowInterface.h"
#include "CMAIServiceInterface.h"
#include "CMRecordServiceInterface.h"

class AppConfig;

class SnakyMediaRun
{
  public:
    SnakyMediaRun();
    SnakyMediaRun(const char *app_config);
    virtual ~SnakyMediaRun();

    int runUntil();
    int runStop();

  protected:
    int init(const char *app_config);

    int start();
    int stop();

  private:
    CMVideoImpl *impl;
    CMVideoContext ctx;
    CMVideoBuf buf;
    CMUIShowInterface *showIt;
    CMAIServiceInterface *aiService;

    CMRecordServiceInterface *pri_recordService;

    AppConfig *appConfig;

    bool exited;
};

#endif // JKLIBS_SNAKYMEDIARUN_H
